package cn.smartorigin.soas.frame.statusbar;

import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JLabel;
import javax.swing.SwingConstants;

import cn.smartorigin.soas.frame.SoasUtil;

public class StatusLabel extends JLabel {
	
    public StatusLabel() {
        this(null, null);
    }

    public StatusLabel(String text) {
        this(text, null);
    }

    public StatusLabel(Icon icon) {
        this(null, icon);
    }

    public StatusLabel(String text, Icon icon) {
        super(text, icon, SwingConstants.LEADING);
        init();
    }
    
    protected void init() {
        this.setOpaque(false);
        this.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
        this.setFont(SoasUtil.FONT_12_BOLD);
        this.setForeground(SoasUtil.DEFAULT_TEXT_COLOR);
        this.setVerticalAlignment(SwingConstants.CENTER);
        this.setVerticalTextPosition(SwingConstants.CENTER);
        this.setIconTextGap(5);
    }
}
